﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DevCangjie.utils.MathUtils
{
    internal class MathUtils
    {
        // 获取数字的位数
        public static int GetDigitCount(int number)
        {
            if (number == 0)
            {
                return 1;
            }

            return (int)Math.Floor(Math.Log10(Math.Abs(number)) + 1);
        }
    }
}
